<?php
$query = "select idMenu from Menu where M_NombreMenu='superior'";
$res = mysqli_query($con, $query);
$row = mysqli_fetch_array($res);
$idMenu = $row["idMenu"];
$query = "select IM_Nombre, IM_Link from ItemsMenu where idMenu=$idMenu order by idItemsMenu";
$res = mysqli_query($con, $query);
echo "<ul>";
while($row = mysqli_fetch_array($res))
{
    echo "<li><a href=\"" . $row["IM_Link"] . "\">" . $row["IM_Nombre"] . "</a></li>";
}
echo "</ul>"
?>
